oracle : set language and charset Hint SQLs


SELECT *
FROM NLS_DATABASE_PARAMETERS
WHERE PARAMETER in ('NLS_NCHAR_CHARACTERSET','NLS_CHARACTERSET','NLS_LANGUAGE');

select distinct(nls_charset_name(charsetid)) CHARACTERSET,
decode(type#, 1, decode(charsetform, 1, 'VARCHAR2', 2, 'NVARCHAR2','UNKOWN'),
9, decode(charsetform, 1, 'VARCHAR', 2, 'NCHAR VARYING', 'UNKOWN'),
96, decode(charsetform, 1, 'CHAR', 2, 'NCHAR', 'UNKOWN'),
112, decode(charsetform, 1, 'CLOB', 2, 'NCLOB', 'UNKOWN')) TYPES_USED_IN
from sys.col$ where charsetform in (1,2) and type# in (1, 9, 96, 112);

   SELECT VALUE FROM NLS_DATABASE_PARAMETERS WHERE PARAMETER='NLS_CHARACTERSET';

SELECT name, value$
FROM sys.props$
WHERE name = 'NLS_CHARACTERSET';

SELECT name, value$
FROM sys.props$
WHERE name = 'NLS_NCHAR_CHARACTERSET';

SELECT name, value$
FROM sys.props$
WHERE name = 'NLS_LANGUAGE';

SELECT name, value$
FROM sys.props$
WHERE name = 'NLS_TERRITORY';

UPDATE sys.props$
SET value$ = 'AL32UTF8'
WHERE name = 'NLS_CHARACTERSET';

UPDATE sys.props$
SET value$ = 'AL16UTF16'
WHERE name = 'NLS_NCHAR_CHARACTERSET';

UPDATE sys.props$
SET value$ = 'AMERICAN'
WHERE name = 'NLS_LANGUAGE';

UPDATE sys.props$
SET value$ = 'AMERICA'
WHERE name = 'NLS_TERRITORY';

commit;

UPDATE sys.props$
SET value$ = 'KO16MSWIN949'
WHERE name = 'NLS_CHARACTERSET';

UPDATE sys.props$
SET value$ = 'AL16UTF16'
WHERE name = 'NLS_NCHAR_CHARACTERSET';

UPDATE sys.props$
SET value$ = 'AMERICAN'
WHERE name = 'NLS_LANGUAGE';

UPDATE sys.props$
SET value$ = 'AMERICA'
WHERE name = 'NLS_TERRITORY';

commit;

UPDATE sys.props$
SET value$ = 'KO16KSC5601'
WHERE name = 'NLS_CHARACTERSET';

UPDATE sys.props$
SET value$ = 'AL16UTF16'
WHERE name = 'NLS_NCHAR_CHARACTERSET';

UPDATE sys.props$
SET value$ = 'AMERICAN'
WHERE name = 'NLS_LANGUAGE';

UPDATE sys.props$
SET value$ = 'AMERICA'
WHERE name = 'NLS_TERRITORY';

commit;